package hu.mapro.gwtui.client;

import java.util.List;

import com.google.common.collect.Lists;

public class Handlers {

	List<Action> handlers = Lists.newArrayList();
	
	public void add(Action action) {
		handlers.add(action);
	}
	
	public boolean remove(Action o) {
		return handlers.remove(o);
	}

	public void fire() {
		for (Action a : handlers) {
			a.perform();
		}
	}
	
	public static Handlers newInstance() {
		return new Handlers();
	}
	
}
